package com.bdqn.mapper.ContractApply;

import com.bdqn.entity.ContractApply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ContractApplyMapper {
    /**
     * 分页查询
     * @param pageNum 页码
     * @param pageSize 页大小
     * @param apply
     * @return
     */
    List<ContractApply> findAllByPage(@Param("pageNum") int pageNum,@Param("pageSize") int pageSize, @Param("apply") ContractApply apply);

    /**
     * 分页查询
     * @param pageNum 页码
     * @param pageSize 页大小
     * @param apply
     * @return
     */
    List<ContractApply> findAllByPage2(@Param("pageNum") int pageNum,@Param("pageSize") int pageSize, @Param("apply") ContractApply apply);


    /**
     * 查询总记录
     * @return
     */
    int getCount();

    /**
     * 根据id查找合同申请
     */
    ContractApply findById(@Param("apply") ContractApply contractApply);

    boolean insert(@Param("apply") ContractApply contractApply);

    int SelMaxId();

    /**
     * 根据编号修改状态
     * @param apply
     * @return
     */
    boolean updateStatus(@Param("apply") ContractApply apply);

    /**
     * 根据i合同申请d查询合同申请
     * @param apply
     * @return
     */
    ContractApply findConAppById(@Param("apply") ContractApply apply);

    boolean Del(@Param("id") int id);
}
